#ifndef TYPES_H
#define TYPES_H

#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <time.h>
#include <math.h>
#include <unistd.h>
#include <fcntl.h>
#include <dlfcn.h>
#include <sys/mman.h>
#include <sys/ioctl.h>
#include <linux/fb.h>
#include <magic.h>
#include <wand/MagickWand.h>
#include <ft2build.h>
#include FT_FREETYPE_H
#include <bzlib.h>

typedef struct
{
	unsigned int xres, yres, bits_per_pixel;
} MODE;

typedef struct
{
	int descriptor;
	char *screen, *swap;
	struct
	{
    		struct fb_fix_screeninfo fixed;
    		struct fb_var_screeninfo original, current;
		struct fb_cmap palette;
		unsigned int code;
	} mode;
} VIDEO;

typedef struct
{
	VIDEO video;
} CP;

typedef struct
{
	struct
	{
		int width, height, bpp;
	} info;
	unsigned char *buffer;
} BOX;

typedef struct
{
	BOX *box;
	void *data;
} DEMO;

typedef struct
{
	void *handle;

	void
	(*DEMO_Init)(DEMO *demo, BOX *box);

	void
	(*DEMO_Frame)(DEMO *demo);

	void
	(*DEMO_Final)(DEMO *demo);
} PLUGIN;

#endif
